About Cave Dig 1.2 © Matthew Beedle 1997 This game is by me, Mr. Matthew David Beedle. I am 17 and will be a Senior in High School. • MattBeedle@kagi.com • http://www.ruralnet.net.au/~rmurphy/FoxChang.html Marketing & Advice by Laurie Murphy. • rmurphy@ruralnet.net.au • http://www.ruralnet.net.au/~rmurphy/FoxChang.html Game Testers • Jesse Kopelman - kope@borg.com Pictures of Foxes • The pictures in the game came from a web page by Ryen Hinisco. I had to modify the pictures so that the would fit in my game properly. All of the pictures are around page size and far better quality. Check out his site! • handiscor@pilot.msu.edu • http://www.geocities.com/RainForest/4707/ This game is proudly programmed in Future BASIC II by STAZ Software. If you want to make games for the Macintosh, you should really look into Future BASIC II. This programming language is great. • www.stazsoftware.com • 800-348-2623 Version 1.0 - Test release. - Have to add caves 83 - 99 Version 1.1 Another test release. - Put back the option of using the arrow keys. - Make some changes in the text - Fix a 'bug' in caves 100-109 Verson 1.2 - Changed the name of the game to Cave Dig instead of Cavern Dig - Added the rest of the caves - Put the instructions for this game into a seperate application The following programming codes are in Future BASIC. When run it makes some squares that bounce around. It shows the basics of handling objects in a game. If you have Future BASIC and want to make games, drop me an eMail! _objs = 50 _bouncer = 1 _block = 2 DIM RECORD object DIM yes DIM type DIM lr,ud DIM oldLr,oldUd DIM lrDir,udDir DIM END RECORD .object DIM c.object (_objs) END GLOBALS WINDOW 1,,,_docNoGrow LOCAL FN MakeObject (ttype,tlr,tud) FOR id = 1 TO _objs LONG IF c.yes (id) = _false c.yes (id) = _true c.type (id) = ttype c.lr (id) = tlr * 32 c.ud (id) = tud * 32 c.lrDir (id) = 1 c.udDir (id) = 1 id = _objs EXIT FN END IF NEXT END FN LOCAL FN RefreshObjects COLOR _zBlack BOX FILL 0,0 TO 512,288 FOR id = 1 TO _objs LONG IF c.yes (id) = _true IF c.type (id) = _block THEN COLOR _zGreen ELSE COLOR _zRed BOX c.lr (id) ,c.ud (id) TO c.lr (id) + 32 , c.ud (id) + 32 END IF NEXT END FN LOCAL FN RectCheck (tlr,tud,tlr2,tud2) backOut = _false LONG IF tlr - tlr2 > -32 LONG IF tlr - tlr2 < 32 LONG IF tud - tud2 > -32 LONG IF tud - tud2 < 32 backOut = _true END IF END IF END IF END IF END FN = backOut LOCAL FN CheckBounds (id) backOut = _false IF c.lr (id) < 0 THEN backOut = _true IF c.lr (id) + 32 >512 THEN backOut = _true IF c.ud (id) < 0 THEN backOut = _true IF c.ud (id) + 32 >256 THEN backOut = _true LONG IF backOut = _false FOR tempId = 1 TO _objs LONG IF c.yes (tempId) = _true AND tempId <> id backOut = FN RectCheck (c.lr (id),c.ud (id),c.lr (tempId),c.ud (tempId)) IF backOut = _true THEN tempId = _objs END IF NEXT END IF END FN = backOut LOCAL FN HandleObjects FOR id = 1 TO _objs LONG IF c.yes (id) = _true c.oldLr (id) = c.lr (id) c.oldUd (id) = c.ud (id) SELECT c.type (id) CASE _bouncer backOut = _false IF c.lrDir (id) = 1 THEN DEC(c.lr (id)) : backOut = FN CheckBounds (id) IF c.lrDir (id) = 2 THEN INC(c.lr (id)) : backOut = FN CheckBounds (id) IF backOut = _true THEN c.lr (id) = c.oldLr (id) : IF c.lrDir (id) = 1 THEN c.lrDir (id) = 2 ELSE c.lrDir (id) = 1 backOut = _false IF c.udDir (id) = 1 THEN DEC(c.ud (id)) : backOut = FN CheckBounds (id) IF c.udDir (id) = 2 THEN INC(c.ud (id)) : backOut = FN CheckBounds (id) IF backOut = _true THEN c.ud (id) = c.oldUd (id) : IF c.udDir (id) = 1 THEN c.udDir (id) = 2 ELSE c.udDir (id) = 1 END SELECT LONG IF (c.lr (id) <> c.oldLr (id)) OR (c.ud (id) <> c.oldUd (id)) COLOR _zBlack BOX c.oldLr (id) ,c.oldUd (id) TO c.oldLr (id) + 32 , c.oldUd (id) + 32 COLOR _zRed BOX c.lr (id) ,c.ud (id) TO c.lr (id) + 32 , c.ud (id) + 32 END IF END IF NEXT END FN FN MakeObject (_bouncer,2,2) FN MakeObject (_bouncer,2,5) FN MakeObject (_bouncer,5,4) FOR x = 2 TO 13 FN MakeObject (_block,x,3) NEXT FN MakeObject (_block,2,6) FN MakeObject (_block,13,6) FN RefreshObjects DO FN HandleObjects DELAY 10 UNTIL FN BUTTON